package cn.edu.zafu.bigdata.x.zhaobolei.Forth;

public class TestCube {
    public static void main(String[] args) {

        Cube cube1 = new Cube(10.0, 10.0, 10.0);
        Cube cube2 = new Cube(10.0, 10.0, 10.0);
        Cube cube3 = new Cube(5.0, 5.0, 5.0);

        System.out.println("cube1 equals cube2 : " + cube1.equals(cube2));
        System.out.println("cube1 equals cube3 : " + cube1.equals(cube3));
        System.out.println("cube2 equals cube3 : " + cube2.equals(cube3));

        // 测试同一个对象
        System.out.println("cube1 equals cube1 : " + cube1.equals(cube1));

        // 测试null对象
        System.out.println("cube1 equals null : " + cube1.equals(null));

        // 测试不同类型对象
        System.out.println("cube1 equals new Object() : " + cube1.equals(new Object()));
    }
}
